package com.chainyoung.component_tmperson.ui.mvp.model;

import com.chainyoung.common.appcommon.entity.CommonList;
import com.chainyoung.common.integration.IRepositoryManager;
import com.chainyoung.common.mvp.BaseModel;
import com.chainyoung.common.utils.RxUtils;
import com.chainyoung.component_tmperson.api.PersonService;
import com.chainyoung.component_tmperson.entity.Reward;
import com.chainyoung.component_tmperson.entity.WalletDebit;
import com.chainyoung.component_tmperson.ui.mvp.contract.RewardContract;
import com.chainyoung.component_tmperson.ui.mvp.contract.WalletDebitContract;

import java.util.List;
import java.util.TreeMap;

import javax.inject.Inject;

import io.reactivex.Flowable;

public class RewardModel extends BaseModel implements RewardContract.Model {




    @Inject
    RewardModel(IRepositoryManager repositoryManager) {
        super(repositoryManager);

    }



    @Override
    public Flowable<CommonList<Reward>> getRewardList(TreeMap<String, Object> map) {
        return mRepositoryManager.obtainRetrofitService(PersonService.class)
                .getReward(map)
                .compose(RxUtils.<CommonList<Reward>>handleResult());
    }
}


